package com.eobard.commons.utils;

import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author Eobard_Thawne
 * @version 1.0
 * @date 2022/7/24 -17:28
 */
@Component
public class DateTimeUtils {

    //返回当前时间
    public  String getTime(){
        System.err.println("Commons模块执行了");
        LocalDateTime ldt=LocalDateTime.now();
        DateTimeFormatter dtf=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        return dtf.format(ldt);
    }
}
